package socket;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.Socket;
import java.sql.ResultSet;

public class SocketCliente {
	
	private static String host = "localhost";
	private static int puerto = 4000;
	private Socket socket;
	ObjectInputStream flujoEntrada;
	
	private ResultSet rs;
	
	public void Conectar() throws IOException, ClassNotFoundException{
		
		socket = new Socket(host, puerto);
		flujoEntrada = new ObjectInputStream(socket.getInputStream());
			
		rs = (ResultSet) flujoEntrada.readObject();
			
		socket.close();
	}

	public ResultSet getRs() {
		return rs;
	}

	
}
